Исходный файл
C:\WINCE600\PLATFORM\COMMON\SRC\X86\COMMON\KITL\kitldrv_x86.c
Модифицированный файл
C:\WINCE600\PLATFORM\PracticeBSP_ARK1370\SRC\COMMON\KITL\kitldrv_x86.c
// //
// Copyright (c) Microsoft Corporation.  All rights reserved. // Copyright (c) Microsoft Corporation.  All rights reserved.
// //
// //
// Use of this sample source code is subject to the terms of the Microsoft // Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If // license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not // you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license, // authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable, // please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation. // see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES. // THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
// //
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// //
//      THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //      THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//      ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //      ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//      THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //      THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//      PARTICULAR PURPOSE. //      PARTICULAR PURPOSE.
//   //  
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#include <windows.h> #include <windows.h>
#include <x86kitl.h> #include <x86kitl.h>
  //------------------------------------------------------------------------------  
  // Prototypes for I825xx  
  BOOL I825xxInit(BYTE* pbBaseAddress, /*DWORD*/UINT32 dwMultiplier, USHORT MacAddr[3]);  
  BOOL I825xxInitDMABuffer(/*DWORD*/UINT32 dwStartAddress, /*DWORD*/UINT32 dwSize);  
  UINT16 I825xxSendFrame(BYTE* pbData, /*DWORD*/UINT32 dwLength);  
  UINT16 I825xxGetFrame(BYTE* pbData, UINT16* pwLength);  
  void I825xxEnableInts(void);  
  void I825xxDisableInts(void);  
  DWORD I825xxGetPendingInts(void);  
  BOOL I825xxReadEEPROM(UINT16 EEPROMAddress, UINT16* pwVal);  
  BOOL I825xxWriteEEPROM(UINT16 EEPROMAddress, UINT16 Data);  
  DWORD I825xxSetOptions(DWORD dwOptions);  
  void I825xxCurrentPacketFilter(/*DWORD*/UINT32 dwFilter);  
  BOOL I825xxMulticastList(PUCHAR pucMulticastAddresses, /*DWORD*/UINT32 dwNoOfAddresses);  
   
  #define OAL_ETHDRV_I825   { \  
     I825xxInit, I825xxInitDMABuffer, NULL, I825xxSendFrame, \  
     I825xxGetFrame, I825xxEnableInts, I825xxDisableInts, \  
     NULL, NULL, I825xxCurrentPacketFilter, I825xxMulticastList \  
  }  
  //------------------------------------------------------------------------------  
  #define EDBG_ADAPTER_I825   7 
  static OAL_KITL_ETH_DRIVER DrvI825    = OAL_ETHDRV_I825;       // I825  
   
static OAL_KITL_ETH_DRIVER DrvNE2k  = OAL_ETHDRV_NE2000;     // NE2000 static OAL_KITL_ETH_DRIVER DrvNE2k  = OAL_ETHDRV_NE2000;     // NE2000
static OAL_KITL_ETH_DRIVER DrvRTL   = OAL_ETHDRV_RTL8139;    // RTL8139 static OAL_KITL_ETH_DRIVER DrvRTL   = OAL_ETHDRV_RTL8139;    // RTL8139
static OAL_KITL_ETH_DRIVER DrvDP    = OAL_ETHDRV_DP83815;    // DP83815 static OAL_KITL_ETH_DRIVER DrvDP    = OAL_ETHDRV_DP83815;    // DP83815
static OAL_KITL_ETH_DRIVER DrvRndis = OAL_ETHDRV_RNDIS;      // RNDIS static OAL_KITL_ETH_DRIVER DrvRndis = OAL_ETHDRV_RNDIS;      // RNDIS
static OAL_KITL_ETH_DRIVER Drv3C90  = OAL_ETHDRV_3C90X;      // 3C90X static OAL_KITL_ETH_DRIVER Drv3C90  = OAL_ETHDRV_3C90X;      // 3C90X
   
   
const SUPPORTED_NIC g_NicSupported []= const SUPPORTED_NIC g_NicSupported []=
{ {
//   VenId   DevId   UpperMAC      Type              Name   Drivers //   VenId   DevId   UpperMAC      Type              Name   Drivers
//  --------------------------------------------------------------------------------- //  ---------------------------------------------------------------------------------
   {0x0000, 0x0000, 0x004033, EDBG_ADAPTER_NE2000,  "AD", &DrvNE2k  }, /* Addtron */\    {0x0000, 0x0000, 0x004033, EDBG_ADAPTER_NE2000,  "AD", &DrvNE2k  }, /* Addtron */\
   {0x1050, 0x0940, 0x004005, EDBG_ADAPTER_NE2000,  "LS", &DrvNE2k  }, /* LinkSys */\    {0x1050, 0x0940, 0x004005, EDBG_ADAPTER_NE2000,  "LS", &DrvNE2k  }, /* LinkSys */\
   {0x1050, 0x0940, 0x002078, EDBG_ADAPTER_NE2000,  "LS", &DrvNE2k  }, /* LinkSys */\    {0x1050, 0x0940, 0x002078, EDBG_ADAPTER_NE2000,  "LS", &DrvNE2k  }, /* LinkSys */\
   {0x10EC, 0x8029, 0x00C0F0, EDBG_ADAPTER_NE2000,  "KS", &DrvNE2k  }, /* Kingston */\    {0x10EC, 0x8029, 0x00C0F0, EDBG_ADAPTER_NE2000,  "KS", &DrvNE2k  }, /* Kingston */\
   {0x10EC, 0x8129, 0x000000, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\    {0x10EC, 0x8129, 0x000000, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\
   {0x10EC, 0x8139, 0x00900B, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek  */\    {0x10EC, 0x8139, 0x00900B, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek  */\
   {0x10EC, 0x8139, 0x00D0C9, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\    {0x10EC, 0x8139, 0x00D0C9, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\
   {0x10EC, 0x8139, 0x00E04C, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\    {0x10EC, 0x8139, 0x00E04C, EDBG_ADAPTER_RTL8139, "RT", &DrvRTL   }, /* RealTek */\
   {0x1186, 0x1300, 0x0050BA, EDBG_ADAPTER_RTL8139, "DL", &DrvRTL   }, /* D-Link */\    {0x1186, 0x1300, 0x0050BA, EDBG_ADAPTER_RTL8139, "DL", &DrvRTL   }, /* D-Link */\
   {0x100B, 0x0020, 0x00A0CC, EDBG_ADAPTER_DP83815, "NG", &DrvDP    }, /* Netgear */\    {0x100B, 0x0020, 0x00A0CC, EDBG_ADAPTER_DP83815, "NG", &DrvDP    }, /* Netgear */\
   {0x10B7, 0x9050, 0x006008, EDBG_ADAPTER_3C90X,   "3C", &Drv3C90  }, /* 3Com */\    {0x10B7, 0x9050, 0x006008, EDBG_ADAPTER_3C90X,   "3C", &Drv3C90  }, /* 3Com */\
   {0x10B7, 0x9200, 0x000476, EDBG_ADAPTER_3C90X,   "3C", &Drv3C90  }, /* 3Com */     {0x10B7, 0x9200, 0x000476, EDBG_ADAPTER_3C90X,   "3C", &Drv3C90  }, /* 3Com */\ 
   {0x10b5, 0x9054, 0x00800f, EDBG_USB_RNDIS,       "NC", &DrvRndis }, /* NetChip */     {0x10b5, 0x9054, 0x00800f, EDBG_USB_RNDIS,       "NC", &DrvRndis }, /* NetChip */\ 
     {0x8086, 0x1039, 0x004033, EDBG_ADAPTER_I825,    "IN", &DrvI825  }, /* Intel */\  
     {0x8086, 0x103A, 0x004033, EDBG_ADAPTER_I825,    "IN", &DrvI825  }, /* Intel */\  
     {0x8086, 0x1051, 0x004033, EDBG_ADAPTER_I825,    "IN", &DrvI825  }, /* Intel */\  
     {0x8086, 0x1229, 0x004033, EDBG_ADAPTER_I825,    "IN", &DrvI825  }, /* Intel */\  
     {0x8086, 0x2449, 0x004033, EDBG_ADAPTER_I825,    "IN", &DrvI825  }, /* Intel */  
}; };
   
const int g_nNumNicSupported = sizeof (g_NicSupported) / sizeof (g_NicSupported[0]); const int g_nNumNicSupported = sizeof (g_NicSupported) / sizeof (g_NicSupported[0]);